//
//  BaseEffectView.m
//  YYPHSpeedJump
//
//  Created by sujiang on 16/1/6.
//  Copyright © 2016年 sujiang. All rights reserved.
//

#import "BaseEffectView.h"

@implementation BaseEffectView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
        UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blur];
        effectView.alpha = 0.5;
        effectView.frame = CGRectMake(0, 0, frame.size.width, frame.size.height);
        [self addSubview:effectView];
        effectView.backgroundColor = [UIColor blackColor];

        
        self.loginBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
        self.registBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
        [self addSubview:self.loginBtn];
        [self addSubview:self.registBtn];
        self.loginBtn.frame = CGRectMake(20, frame.size.height / 2, frame.size.width - 40, 50);
        self.registBtn.frame = CGRectMake(20, self.loginBtn.bottom + 15, self.loginBtn.width, 50);
        [self.loginBtn setBackgroundImage:[UIImage imageNamed:@"dlgr"] forState:(UIControlStateNormal)];
        [self.registBtn setBackgroundImage:[UIImage imageNamed:@"zhuce"] forState:(UIControlStateNormal)];
        
        
    }
    
    return self;
}

@end
